define(function() {
    return ['$scope','$location', '$interval','$timeout','$routeParams', function($scope,$location,$interval,$timeout,$routeParams) {
		$scope.$emit("top-show",'true');//顶部显示
    	$scope.$emit('menuTypeLight','mine'); 	//控制底部menu高亮
    	$scope.$emit('bub-menu','true'); 	//隐藏底部menu
    	$scope.$emit('flag-tag','48');//显示底部文字

    	if(!_YHC_isWEIXIN.isWeiXin()){
	    		home.getCurrVersion(null,function(ret){
	            console.log(ret)
	            $timeout(function () {
	                $scope.versionNo=JSON.parse(ret).body;
	                $scope.showVersion = true;

	            },0)
	        },function(ret){console.log(ret)})
	        

    	}else{
    		$scope.showVersion = false;
    	}
        


        $scope.check=function (){
            if(_YTG_IOSorANDROID.systemJudge() == "Android"){
                home.checkVersion(null,function(ret){
                    console.log(ret)
                },function(ret){console.log(ret)})
            }else{
                //window.location = "https://itunes.apple.com/cn/app/id1244980368?mt=8";
            }

        }

        if(_YTG_IOSorANDROID.systemJudge() == "Android" && !_YHC_isWEIXIN.isWeiXin()){
            $scope.showCheckV=true;
        }else {
            $scope.showCheckV=false;
        }

        $scope.$apply();
    }];
});